package com.example.Controller;

import com.example.MainScene;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.image.Image;
import javafx.scene.layout.AnchorPane;
import javafx.stage.Stage;

public class LoginController {
    @FXML
    Label label;
    @FXML protected void Start(ActionEvent event) throws Exception{
        MainScene main=new MainScene();
        main.open();
        label.getScene().getWindow().hide();
    }
    @FXML protected void Helper(ActionEvent event)throws Exception{
        label.getScene().getWindow().hide();
        Parent anchor=new AnchorPane();
        anchor= FXMLLoader.load(getClass().getResource("/view/help.fxml"));
        Stage stage=new Stage();
        stage.setScene(new Scene(anchor,740,520));
        stage.getIcons().add(new Image(getClass().getResourceAsStream("/image/pane.png")));
        stage.setTitle("游戏帮助");
        stage.show();

    }
}
